package org.jeecg.trace.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.trace.dto.MesMaterialSetDTO;
import org.jeecg.trace.entity.MesMaterialSet;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description: 物料工件关联表
 * @Author: shaolong
 * @Date:   2022-10-26
 * @Version: V1.0
 */
public interface MesMaterialSetMapper extends BaseMapper<MesMaterialSet> {

	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
    public boolean deleteByMainId(@Param("mainId") String mainId);

    /**
     * 通过主表id查询子表数据
     *
     * @param mainId 主表id
     * @return List<MesMaterialSet>
     */
    public List<MesMaterialSet> selectByMainId(@Param("mainId") String mainId);

    IPage<MesMaterialSetDTO> listMesMaterialSetProduct(Page<MesMaterialSetDTO> page, Map<String, String> param);

    IPage<MesMaterialSet> mesMaterialSetByProduct(Page<MesMaterialSet> page, @Param("list") List<String> list);
}
